1. Field of the Invention
The invention relates to a quantizer table controller of quantizer/inverse-quantizer in an image compression and expansion apparatus.
2. Description of the Prior Art
FIG. 8 is a block diagram showing a conventional image compression and expansion apparatus. An operation of the first embodiment is explained below. First of all, in the coder portion, image data, for example, component image Pxy (x, y=0,1,2,3 . . . 7) having an 8-bit width, is inputted from the image data input terminal 1. The inputted image data is transmitted to DCT (Discrete Cosine Transformer) 2. DCT 2 carries out a two dimensional Discrete Cosine Transform on the divided 8xc3x978 picture element block Pxy. As a result of the two dimensional Discrete Cosine Transform, 64 (=8xc3x978) coefficients Suv are obtained. The 64 coefficients obtained are then rearranged from a serial order to a zigzag order in a zigzag transformer 23 and transmitted to the quantizer 3. The 64 coefficients are quantized in the quantizer 3 by different step sizes at every coefficient location using the quantization table 4. The 64 quantized coefficients are transmitted to Huffman encoder 5. Huffman encoder 5 carries out a coding operation according to Huffman coding system using the encoding table 6 and the encoded data are outputted from the output terminal 7 in units of several bytes (16-bits wide, for instance).
Next, in the decoder portion, the encoded data are inputted into an input terminal 8 in units of several bytes unit. The inputted encoded data are transmitted to Huffman decoder 9. In Huffman decoder 9, the data is then decoded to ruv by Huffman decoding system using the encoding table 6 and then transmitted to the inverse-quantizer 10. Huffman decoded coefficients are inverse-quantized to Suv in the inverse-quantizer 10 per 64 coefficients using the quantization table 4 rearranged from a zigzag order into a serial order for every 8xc3x978 image block at an inverse zigzag transformer 24, and then transmitted to the inverse discrete cosine transformer (IDCT) 11.
The inverse discrete cosine transformer 11 carries out a two dimensional Inverse Discrete Cosine Transform for every 8xc3x978 picture element block. As a result of Inverse Discrete Cosine Transform, reconstruction image data Pxy for every 8xc3x978 picture element block are obtained and then the image data Pxy are outputted from the image data output terminal 12 as a component image having an 8 -bit width.
Detailed operation is explained below. An 8xc3x978 component image Pxy (x, y=0, 1, 2, 3 . . . 7) is transformed using a two dimensional Discrete Cosine Transform at DCT 2 and the following coefficient Suv is obtained from formula (1):                               S          uv                =                              1            4                    ⁢                      C            u                    ⁢                      C            v                    ⁢                                    ∑                              x                =                0                            7                        ⁢                                          ∑                                  y                  =                  0                                7                            ⁢                                                (                                                            P                      xy                                        -                                          L                      s                                                        )                                ⁢                cos                ⁢                                  xe2x80x83                                ⁢                                                                            (                                                                        2                          ⁢                          x                                                +                        1                                            )                                        ⁢                    u                    ⁢                                          xe2x80x83                                        ⁢                    π                                    16                                ⁢                                  xe2x80x83                                ⁢                cos                ⁢                                  xe2x80x83                                ⁢                                                                            (                                                                        2                          ⁢                          y                                                +                        1                                            )                                        ⁢                    v                    ⁢                                          xe2x80x83                                        ⁢                    π                                    16                                                                                        (        1        )            
where x, y=picture element position within block u, v=location of Discrete Cosine Transform coefficient                               Cu          ,                      Cv            =                                          1                /                                  2                                            :                                                            u          ,                      v            =            0                                                        =                      1            :                                      others                                          Ls          =                      128            :                                                            bit            ⁢                          xe2x80x83                        ⁢            accuracy            ⁢                          xe2x80x83                        ⁢            of            ⁢                          xe2x80x83                        ⁢            Pxy                    =                      8            ⁢                          xe2x80x83                        ⁢            bits                                                        =                      2048            :                                                            bit            ⁢                          xe2x80x83                        ⁢            accuracy            ⁢                          xe2x80x83                        ⁢            of            ⁢                          xe2x80x83                        ⁢            Pxy                    =                      12            ⁢                          xe2x80x83                        ⁢            bits                              
Discrete Cosine Transform coefficient Suv is obtained by the two dimensional Discrete Cosine Transform. Discrete Cosine Transform coefficient Suv, as shown in FIG.9, comprises S00 (DC coefficient) and the rest of S01xcx9cS77 (AC coefficient). S00 has a maximum value and other values of AC coefficient are very small compared with S00.
A more detailed explanation about the quantizer 3 and the inverse-quantizer 10 of the invention is given below. Discrete Cosine Transform coefficients obtained as above are divided using values Quv of quantization table 4 in the quantizer 3. In other words, a quantized Discrete Cosine Transform coefficient ruv is calculated as follows.
ruv=round (Suv/Quv)
Where, the round function is a function which assigns an operation result of Suv /Quv to a nearest integer number. Therefore, a quantization table value Quv is determined such that the quantization table value Quv becomes large where the two dimensional order uv increases. As a result, most of the AC coefficients become zero where the two dimensional order uv is large. Thus, the component image of 8xc3x978 picture elements is transformed by two dimensional Discrete Cosine Transform and quantized in order to compress the component image, which greatly decreases the transmitted bits as a result.
On the other hand, in the decoder portion, a compressed picture signal inputted from the input terminal 8 is decoded in Huffman decoder 9 and transformed to quantized Discrete Cosine Transform coefficients ruv. Quantized Discrete Cosine Transform coefficient ruv is multiplied, i.e. inverse-quantized, by value Quv of quantization table 4 in the inverse-quantization 10.
Discrete Cosine Transform coefficient Suv is obtained by carrying out the inverse-quantization by the following formula:
Suv=ruvxc3x97Quv
Discrete Cosine Transform coefficient Suv thus obtained is transformed to a component image Pxy of 8xc3x978 picture elements by a two dimensional Inverse Discrete Cosine Transform shown in formula (2):
                              P          xy                =                                            1              4                        ⁢                                          ∑                                  u                  =                  0                                7                            ⁢                                                ∑                                      v                    =                    0                                    7                                ⁢                                                      C                    u                                    ⁢                                      C                    v                                    ⁢                                      S                    uv                                    ⁢                  cos                  ⁢                                      xe2x80x83                                    ⁢                                                                                    (                                                                              2                            ⁢                            x                                                    +                          1                                                )                                            ⁢                      u                      ⁢                                              xe2x80x83                                            ⁢                      π                                        16                                    ⁢                                      xe2x80x83                                    ⁢                  cos                  ⁢                                      xe2x80x83                                    ⁢                                                                                    (                                                                              2                            ⁢                            y                                                    +                          1                                                )                                            ⁢                      v                      ⁢                                              xe2x80x83                                            ⁢                      π                                        16                                                                                +                      L            s                                              (        2        )            
where x, y=picture element position within block u, v=location of Discrete Cosine Transform coefficient                               Cu          ,                      Cv            =                                          1                /                                  2                                            :                                                            u          ,                      v            =            0                                                        =                      1            :                                      others                                          Ls          =                      128            :                                                            bit            ⁢                          xe2x80x83                        ⁢            accuracy            ⁢                          xe2x80x83                        ⁢            of            ⁢                          xe2x80x83                        ⁢            Pxy                    =                      8            ⁢                          xe2x80x83                        ⁢            bits                                                        =                      2048            :                                                            bit            ⁢                          xe2x80x83                        ⁢            accuracy            ⁢                          xe2x80x83                        ⁢            of            ⁢                          xe2x80x83                        ⁢            Pxy                    =                      12            ⁢                          xe2x80x83                        ⁢            bits                              
Since the quantizer/inverse-quantizer in a conventional image compression and expansion apparatus is constructed as explained above, a table value had to be updated because every different processing or expansion processing needs a different quantization table value. When updating a quantization table, it is difficult to update a quantization table without stopping the system. Therefore, it is necessary to stop the system before updating the quantization table in the conventional art.
It is an object of the present invention to provide an image compression and expansion apparatus which changes values of a quantization table of quantizer/inverse-quantizer in appearance by carrying out an operation at each processing step without actually writing new quantization table values in a quantization table.
It is a further object of the present invention to provide an image compression and expansion apparatus wherein values of register can be controlled from outside a CPU, which may easily change many kinds of tables.
It is a further object of the present invention to provide an image compression and expansion apparatus wherein the compressibility of image may be easily changed locally in the display by always monitoring the compression data and by changing a scaling factor according to various kinds of conditions such as a block unit and a block line unit.
It is a further object of the present invention to provide an image compression and expansion apparatus wherein the compressibility can be changed such that it is rough at the end of a frame and fine at the center portion of the frame.
According to a further aspect of the present invention, there is provided an image compression and expansion apparatus which comprises a register for setting necessary values in response to an outside signal; a data processing unit for carrying out an operation between values set into the register and values in the quantization table thereby carrying out quantization and inverse-quantization operations.
According to a further aspect of the present invention, there is provided an image compression and expansion apparatus wherein a data processing unit comprises multiplication means which multiplies data output Quv of the quantization table by an output C of the register to generate a new table value Quvxe2x80x2 using following formula.
xe2x80x83Quvxe2x80x2=Quvxc3x97C
According to a further aspect of the present invention, there is provided an image compression and expansion apparatus wherein a data processing unit comprises shift means which shifts a data output Quv of the quantization table toward an upper bit direction or a lower bit direction in response to output C of the register to generate a new table value Quvxe2x80x2 using the following formula:
Quvxe2x80x2=Quvxc3x972c
According to further aspect of the present invention, there is provided an image compression and expansion apparatus wherein a data processing unit comprises multiplication means which multiplies a data output Quv of the quantization table by an output C of the register, and a shift means which shifts data output Quv of the quantization table toward an upper bit direction or a lower bit direction in response to the output C of the register to generate a new table value Quvxe2x80x2 using the following formula:
Quvxe2x80x2=Quvxc3x97Cxc3x972n
According to a further aspect of the present invention, there is provided an image compression and expansion apparatus wherein a data processing unit comprises division means which divides a data output Quv of the quantization table by an output C of the register to generate the new table value Quvxe2x80x2 using a following formula:
Quvxe2x80x2=Quv/C
According to a further aspect of the present invention, there is provided an image compression and expansion apparatus wherein a data processing unit comprises shift means which shifts a data output Quv of the quantization table toward an upper bit direction or a lower bit direction according to the output C of the register, and division means which divides a data output Quv of the quantization table by the output C of the register to generate a new table value Quvxe2x80x2 using following formula:
Quvxe2x80x2=Quvxc3x972n/C
According to further aspect of the present invention, there is provided an image compression and expansion apparatus wherein an output C of the data processing unit is a constant.
According to further aspect of the present invention, there is provided an image compression and expansion apparatus wherein the output C of the data processing unit is a function of picture element location (u,v), that is, C=f (u,v).
According to further aspect of the present invention, there is provided an image compression and expansion apparatus wherein the output C of the data processing unit is a function of location in a frame.